﻿@model ScrumProject.Models.Story

@{
    ViewBag.Title = "Edit";
}

<h2>Edit Stories</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Story</legend>

        @Html.HiddenFor(model => model.Id)

                <table>
            <tr style="height:20px"></tr>
            <tr>
                <td style="width:650px; padding-left:50px" valign="top">
                    <div class="editor-label">
                        <br />
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Name)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Name, new { style = "width: 400px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Name)
                    </div>

                    <div class="editor-label">
                        @Html.LabelFor(model => model.Description)
                    </div>
                    <div class="text-box.multi-line">
                        @Html.TextAreaFor(model => model.Description, new { style = "width:400px; height:150px; font-family:Verdana, Helvetica, Sans-Serif; font-size:15px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Description)
                    </div>

                    

                </td>

                <td style="width:650px" valign="top">
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Tests)
                    </div>
                    <div class="text-box.multi-line">
                        @Html.TextAreaFor(model => model.Tests, new { style = "width:400px; height:100px; font-family:Verdana, Helvetica, Sans-Serif; font-size:15px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Tests)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Priority)
                    </div>
                    <div class="editor-field">
                        @Html.DropDownListFor(m => m.Priority, new SelectList(new ScrumProject.ViewModels.PriorityViewModel().GetPriorities(), "Id", "PriorityCode"), new { style = "width: 400px" })
                        @*@Html.EditorFor(model => model.Priority)*@
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Priority)
                    </div>

                    <div class="editor-label">
                        @Html.LabelFor(model => model.BusinessValue)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.BusinessValue, new { style = "width: 400px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.BusinessValue)
                    </div>

                    <div class="editor-label" style="display:none;">
                        @Html.LabelFor(model => model.Status)
                    </div>
                    <div class="editor-field" style="display:none;" >
                        @Html.DropDownListFor(m => m.Status, new SelectList(new ScrumProject.ViewModels.StatusViewModel().GetStatus(), "Id", "StatusCode"), new { style = "width:400px;"})
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Status)
                    </div>

                    @*<div class="editor-label">
                        @Html.LabelFor(model => model.Notes)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Notes, new { style = "width: 400px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Notes)
                    </div>

                    <div class="editor-label">
                        @Html.LabelFor(model => model.Points)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(model => model.Points, new { style = "width: 400px" })
                    </div>
                    <div>
                        @Html.ValidationMessageFor(model => model.Points)
                    </div>*@

                   @* <div class="editor-label">
                        @Html.LabelFor(model => model.ProjectId, "Project")
                    </div>
                    <div class="editor-field">
                        @Html.DropDownList("ProjectId", "Select Project")
                        @Html.ValidationMessageFor(model => model.ProjectId)
                    </div>*@

                    <p>
                        <input type="submit" value="Save" class="btn" />
                    </p>
                </td>
            </tr>
        </table>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index", new { projectId = ViewBag.newId }, null)
</div>
